package com.doit.day01;

import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZooKeeper;

import java.io.IOException;

public class GetDemo {
    public static void main(String[] args) throws IOException, InterruptedException, KeeperException {

        //创建zk的对象
        ZooKeeper zk = new ZooKeeper("linux01:2181",2000,null);

        byte[] data = zk.getData("/teacher", null, null);

        System.out.println(new String(data));


    }
}
